package com.github.jettyrun.springinterface.demo.factorybean;

import com.github.jettyrun.springinterface.demo.bean.Car;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * Created by jetty on 18/1/31.
 */
@Component("singletonCarFactoryBean")
public class SingletonCarFactoryBean implements FactoryBean<Car>{

    private Car carProxy=new Car();

    public Car getObject() throws Exception {
        return carProxy;
    }

    public Class<?> getObjectType() {
        return null;
    }

    public boolean isSingleton() {
        return true;
    }
}
